home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / workspace.701 < prev    next >
Text File  |  1992-02-06  |  3KB  |  42 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  2. \paperw10940
  3. \paperh7840
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 document folder package\
  8. \
  9.  
  10. \pard\tx420\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-400\li400 Q:    Is there a way to make a .wn-style document file package, so that it appears to the user as a file rather than a directory? \
  11.  
  12. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 \
  13.  
  14. \pard\tx420\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-400\li400 A:    A file package is a special kind of directory containing a set of related files that usually aren't accessed individually.  You can use a file package to hold a collection of files that make up one complete document, such as the text of a document and its imbedded graphic files.  A file package provides a convenient way to shield the files related to the application from the user; the package acts as though it were one document.  The Workspace Manager represents the package in the File Viewer by the document icon, and the Open command launches the application and opens the file rather than opening the directory.  \
  15.  
  16. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-420\li420 \
  17.  
  18. \pard\tx420\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\li400\fc0 It is easy to make your own document file package, because a file package is simply a directory which ends with the extension your application claims for its documents.  In the IB Project Attributes Inspector, you can associate a custom document icon with a file name extension.  When you create a directory with that extension, the Workspace Manager will display it using your custom icon instead of the folder icon.  When a user double-clicks on that icon, it will launch your program and request that it open that document/directory.  \
  19. \
  20. When opening a document, your application should stat the file pathname to determine whether it is a file or a directory.  If it is a directory, you will probably open particular files within the directory and put together the complete document.  As an example, when WriteNow is opening a document package, it looks inside the directory for the file “WNDocument.wn”.  This file contains the text of the document and also has pointers to the embedded graphic files which are also stored in the file package.\
  21. \
  22.     See also: \
  23.     
  24. \b registry.286
  25. \b0 :  be sure to reserve your document file name extensions with NeXT Developer Support to avoid conflicts.\
  26.     \
  27.     
  28. \b workspace.301: 
  29. \b0  for information about making a file package for your application.\
  30.     \
  31.     
  32. \b workspace.694
  33. \b0 :  for information about registering your application with the workspace.\
  34.     \
  35.  
  36. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 QA701\
  37. \
  38. Valid for 1.0\
  39. Valid for 2.0\
  40. \
  41.  
  42.